<!DOCTYPE html>
<html>
<head>
    <title>课程表</title>
		<#include "/header.html">
    <link rel="stylesheet" href="${request.contextPath}/statics/css/bootstrap-datetimepicker.css">
    <script src="${request.contextPath}/statics/libs/bootstrap.min.js"></script>
    <script src="${request.contextPath}/statics/libs/datetimePick/bootstrap-datetimepicker.js"></script>
    <script src="${request.contextPath}/statics/libs/datetimePick/bootstrap-datetimepicker.zh-CN.js"></script>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div class="form-group col-sm-1">
                <input type="text" class="form-control" v-model="q.courseDay" id="courseDay"  @keyup.enter="query" placeholder="日期">
            </div>
            <div class="form-group col-sm-1">
                <select class="form-control"  v-model="q.laboratoryId"  @keyup.enter="query"  >
                    <option value=null>选择实验室</option>
                    <option style="height: 20px;!important"   v-for="(laboratory,i) in allLaboratory" :value='laboratory.id' >{{laboratory.name}}</option>
                </select>
            </div>

            <div class="form-group col-sm-1">
                <input type="text" class="form-control" v-model="q.teacherName" @keyup.enter="query" placeholder="授课教师">
            </div>
            <div class="form-group col-sm-1">
                <input type="text" class="form-control" v-model="q.courseName" @keyup.enter="query" placeholder="课程">
            </div>
            <div class="form-group col-sm-1">
                <input type="number" class="form-control" v-model="q.batch" @keyup.enter="query" placeholder="课程批次">
            </div>
            <a class="btn btn-default" @click="query">查询</a>
			<#if shiro.hasPermission("sys:jxcourseschedule:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("sys:jxcourseschedule:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("sys:jxcourseschedule:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
														                   <div class="form-group">
                        <div class="col-sm-2 control-label">课程</div>
                        <div class="col-sm-10">
                            <select class="form-control" v-model="jxCourseSchedule.courseId"   placeholder="选择课程" >
                               <option v-for="(course,i) in allCourse"  :value='course.id' >{{course.name}}</option>
                            </select>
                        </div>
                    </div>

											                    <div class="form-group">
                        <div class="col-sm-2 control-label">老师</div>
                        <div class="col-sm-10">
                         <select class="form-control"  v-model="jxCourseSchedule.teacherId"   placeholder="选择授课老师" >
                                    <option  v-for="(teacher,i) in  allTeacher"  :value='teacher.userId'  >{{teacher.username}}</option>
                            </select>
                        </div>
                    </div>



              <div class="form-group">
                      <div class="col-sm-2 control-label">实验室</div>
                      <div class="col-sm-10">
                       <select class="form-control"  v-model="jxCourseSchedule.laboratoryId"   placeholder="选择实验室" >
                              <option  v-for="(laboratory,i) in allLaboratory" :value='laboratory.id' >{{laboratory.name}}</option>
                          </select>
                       </div>
                  </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">开始时间</div>
                        <div class="col-sm-10">
                            <input type="text" id="begainTime" class="form-control" value="" placeholder="开始时间"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">结束时间</div>
                        <div class="col-sm-10">
                            <input type="text" id="endTime"  class="form-control"  value=""  placeholder="结束时间"/>
                        </div>
                    </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">批次</div>
                <div class="col-sm-10">
                    <input type="number"  class="form-control" v-model="jxCourseSchedule.batch"  placeholder="请选择课程批次"/>
                </div>
            </div>

							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/jxcourseschedule.js?_${.now?long}"></script>
</body>
</html>